/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.game.math.view.action;

import java.awt.Component;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.SwingUtilities;
import org.game.math.config.Configure;
import org.game.math.view.SettingDialog;

/**
 *
 * @author nmduc
 */
public class PreferenceAction extends AbstractAction {

    @Override
    public void actionPerformed(ActionEvent ae) {
        Configure.getInstance().initializeTempProperties();
        Frame frame = (Frame) SwingUtilities.getRoot((Component) ae.getSource());
        SettingDialog dialog = new SettingDialog(frame, true);
        dialog.setLocationRelativeTo(frame);
        dialog.setVisible(true);
    }
}
